﻿using System;
using Loki.Engine;
using Luna.Data;
using Luna.Data.Configuration;

namespace Luna.Model.Configuration
{
    public class InstallService : ApplicationService<LunaModel, LunaDataModel>, IInstallService
    {
        protected IInstallDataProvider DataProvider
        {
            get { return DataContext.Install; }
        }

        #region IInstallService Members

        public InstallState GetCurrentState()
        {
            return DataProvider.GetDatabaseState();
        }

        public void Install()
        {
            DataProvider.Initialize();
        }

        public void Migrate()
        {
            throw new NotImplementedException();
        }

        #endregion

        private const string _ID = "EC1833BD-7342-451C-8059-936AACF2E74B";

        private const string NAME = "Luna install service";

        public override Guid ID
        {
            get { return new Guid(_ID); }
        }

        public override string Name
        {
            get { return NAME; }
        }
    }
}
